package exercise3;

import javax.swing.JOptionPane;

public class NumberOfDivision {
	public static void printNumberOfDivision() {
		String str = JOptionPane.showInputDialog("请输入整数：");
		int a = Integer.parseInt(str);
		if (a % 5 == 0) {
			if (a % 6 == 0) {
				JOptionPane .showMessageDialog(null,a + " is divisible by both 5 and 6");
			} else {
				JOptionPane .showMessageDialog(null,a + " is divisible by 5 or 6, but not both");
			}
		} else {
			if (a % 6 == 0) {
				JOptionPane .showMessageDialog(null,a + " is divisible by 5 or 6, but not both");
			} else {
				JOptionPane .showMessageDialog(null,a + " is not divisible by either 5 or 6");
			}
		}
	}
}
